import request from '@/utils/request'

export function listVip(query) {
  return request({
    url: '/customer-vip/page',
    method: 'get',
    params: query
  })
}

export function createVip(data) {
  return request({
    url: '/customer-vip/add',
    method: 'post',
    data
  })
}

export function readVip(data) {
  return request({
    url: '/customer-vip/info',
    method: 'get',
    data
  })
}

export function updateVip(data) {
  return request({
    url: '/customer-vip/edit',
    method: 'post',
    data
  })
}

export function deleteVip(query) {
  return request({
    url: '/customer-vip/remove',
    method: 'post',
    params:query
  })
}

export function setState(query) {
  return request({
    url: '/customer-vip/updateStatus',
    method: 'post',
    params:query
  })
}

export function vipLevel(query) {
  return request({
    url: '/customer-vip/list/level',
    method: 'get',
    params: query
  })
}
